import React, { useState, useEffect } from "react";
import { Select, Form } from "antd"; // 假设你正在使用Ant Design的Select组件
import { CommonModal } from "@/views/components/CommonModal";
import Style from "./index.module.less";
import { SearchCheckboxTable } from "@/views/components/SearchTable/index";
import { useTableConfig } from "@/views/components/SearchTable/hooks/useTableConfig";
const onOk = () => {
	onCancel();
};
const SelectLog = ({ tableKey, rowKey, columns, record, detailVisible, tableLogRequest, onCancel }) => {
	useEffect(() => {
		console.log(tableKey, columns, "-------SelectLog-------");
	}, [columns]);
	const tableRequest = tableLogRequest;
	const [form] = Form.useForm();
	const { selectedKeys, selectedRows, dataSource, fetchList, query, searchSimpleTableProps } = useTableConfig({
		tableKey,
		rowKey: "id",
		columns,
		tableRequest,
		autoFetch: false,
		hasPagination: true,
		hasQuickSearch: false,
		beforeQuerySearch: false,
		resetSourceData: false,
		hasColsSetting: true,
		hasToggleSearchForm: false,
		columnResize: false
	});
	// const onCancel = () => {
	// 	handleCancel();
	// 	form.resetFields();
	// };
	useEffect(() => {
		console.log(record, "record");
	}, [record]);
	return (
		<CommonModal title={{ title: "查看日志" }} width="1154px" visible={true} onOk={onOk} onCancel={onCancel} minHeight="100px">
			<div className={Style.detail_inner}>
				<SearchCheckboxTable key={tableKey} {...searchSimpleTableProps} />
			</div>
		</CommonModal>
	);
};

export default SelectLog;
